home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
utility
/
wfind.zip
/
WF2.BAT
next >
Wrap
DOS Batch File
|
1996-06-19
|
3KB
|
135 lines
@echo off
REM the following two lines give white on blue if ANSI.SYS is loaded
REM you should get white on blue even if ANSI.SYS is not loaded.
echo
echo
cls
rem ---------------------------------------------------------
echo.
echo NOTICE:
echo This program creates and overwrites the following files:
echo.
echo the File List filelist.lst
echo the Search List srchlist.lst
echo the Batch File xwnewbat.bat
echo.
if "%TEMP%" == "" goto cc
echo on the %TEMP% subdirectory.
goto dd
:cc
echo on the current root directory on the current drive.
:dd
echo.
echo If this is OK press the Y key, otherwise press the N key.
echo.
wfind2 /c /c:yn
if errorlevel 2 goto quit
rem -----------------------------------------------------
shift
:restart
if "%0" == "" goto msg
wfind2 /c /F %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
if errorlevel 1 goto msg
:start
echo.
echo.
echo WFIND2 - DOS Search Program
echo.
echo 1. Search
echo 2. NOT Search
echo 3. AND Search
echo 4. AND NOT Search
echo 5. OR Search
echo 6. OR NOT Search
echo X Extract Display / Act
echo R Restart the File List
echo H Help
echo Q Quit
echo.
wfind2 /c /c:123456XRHQ
if errorlevel 10 goto quit
if errorlevel 9 goto help
if errorlevel 8 goto restart
if errorlevel 7 goto xdisp
if errorlevel 6 goto onsrch
if errorlevel 5 goto osrch
if errorlevel 4 goto ansrch
if errorlevel 3 goto asrch
if errorlevel 2 goto nsrch
if errorlevel 1 goto srch
goto quit
:srch
wfind2 /c
goto start
:nsrch
wfind2 /c /n
goto start
:asrch
wfind2 /c /a
goto start
:ansrch
wfind2 /c /a /n
goto start
:osrch
wfind2 /c /o
goto start
:onsrch
wfind2 /c /o /n
goto start
:xdisp
wfind2 /c /x
if not errorlevel 128 goto start
if exist %TEMP%\xwnewbat.bat goto aa
if exist %TEMP%xwnewbat.bat goto bb
echo the Batch File is not found
pause
goto start
:aa
call %TEMP%\xwnewbat.bat
wfind2 /z
goto start
:bb
call %TEMP%xwnewbat.bat
wfind2 /z
goto start
:msg
cls
echo To begin:
echo Enter WF2 followed by filenames (up to 10 items, wild cards * and ? are
echo ok) echo on the command line, separated by spaces. To search all
echo subdirectories echo for an item, follow the item by /S (no space).
echo.
echo Enter WF2 *.* to create a File List of all files on the current directory
echo for the current drive. Enter WF2 C:\*.TXT/S to create a File List of all
echo files on drive C with extension TXT.
echo.
echo To access the help file directly, enter: wfind2 /H wfind2.DOC
echo.
echo.
goto end
:help
wfind2 /c /h wfind2.doc
goto start
:quit
REM the following line gives white on black if ANSI.SYS is loaded.
echo
cls
:end